import fetch from 'utils/fetch'

export default {
  // 获取作者列表（params）
  getAuthorList (params) {
    return fetch.post('/pc/commodity/author/list/all', params)
  },
  getAuthor (params) {
    return fetch.post('/pc/commodity/author/list', params)
  },
  // 上下架
  putAway (params) {
    return fetch.post('/pc/commodity/putaway', params)
  },
  // 删除商品
  delGoods (params) {
    return fetch.post('/pc/commodity/del', params)
  },
  // 新增商品
  addGoods (params) {
    return fetch.post('/pc/commodity/add', params)
  },
  // 商品还原
  restoreGoods (params) {
    return fetch.post('/pc/commodity/recycle/restore', params)
  },
  // 回收站列表
  getGoodsRecycleList (params) {
    return fetch.post('/pc/commodity/recycle/list', params)
  },
  // 新增作者
  addAuthor (params) {
    return fetch.post('/pc/commodity/author/add', params)
  },
  // 商品分类列表
  getCategoryList (params) {
    return fetch.post('/pc/commodity/category/list', params)
  },
  // 商品分类列表-搜索条件
  getCategoryOptions (params) {
    return fetch.post('/pc/commodity/category/list/all', params)
  },
  // 商品审核
  auditGoods (params) {
    return fetch.post('/pc/commodity/audit', params)
  },
  // 商品上新
  goodsUpdate (params) {
    return fetch.post('/pc/commodity/newest', params)
  },
  // 商品推荐
  recommendGoods (params) {
    return fetch.post('/pc/commodity/recommend', params)
  },
  // 商品编辑
  editGoods (params) {
    return fetch.post('/pc/commodity/edit', params)
  },
  // 商品详情
  getGoodsDetails (params) {
    return fetch.post('/pc/commodity/details', params)
  },
  // 商品列表
  getGoodsList (params) {
    return fetch.post('/pc/commodity/list', params)
  },
  // 商品库存列表
  getStoreList (params) {
    return fetch.post('/pc/commodity/stock/list', params)
  },
  // 商品库存列表
  getStoreOutList (params) {
    return fetch.post('/pc/commodity/outbound/list', params)
  },
  // 删除创作者
  delCreater (params) {
    return fetch.post('/pc/commodity/author/del', params)
  },
  // 是否禁用创作者
  isShowCreater (params) {
    return fetch.post('/pc/commodity/author/change/enabledFlag', params)
  },
  // 编辑创作者
  editCreater (params) {
    return fetch.post('/pc/commodity/author/update', params)
  },
  // 增加库存信息
  addStore (params) {
    return fetch.post('/pc/commodity/stock/add', params)
  }
}
